
<%@ page language="java" %>
<%@ page import="com.scalar.chiptrack.utils.ConfigManager,
                 com.scalar.chiptrack.users.Functionality,
                 com.scalar.chiptrack.users.User,
                 com.scalar.chiptrack.commons.Constants"%>
<%@ page import="com.scalar.chiptrack.operations.release.forms.AssmReleaseForm" %>


<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>


<chiptrack:checkLogon sourcePage="/assemblyRelease.do" />
<%
    String chipTracContext = "/" + ConfigManager.getChipTracContext();

%>
<HTML>
<HEAD><TITLE>Scalarsoft - ChipTrac </TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<SCRIPT language="JavaScript">
function sendMail ( assmReleaseId )
{
    newWindow = window.open ('<%=chipTracContext%>/sendAssmMail.do?type=Assembly&assmReleaseId=' + assmReleaseId,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    newWindow.focus();
}

function sendMail ( releaseId, category, vendor )
{
    newWindow = window.open ('<%=chipTracContext%>/releaseSendMail.do?releaseId=' + releaseId + '&vendor='+vendor+'&Category='+category+'&processType=Assembly','assmSendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    newWindow.focus();
}        

function confirmAssmRelease()
{
    var assmReleaseId = document.assmReleaseForm.assmReleaseId.value;
    document.assmReleaseForm.action='<%=chipTracContext%>/assmRelease.do?action=confirm&isConfirm=true&assmReleaseId='+assmReleaseId;
    document.assmReleaseForm.submit();
}

function cancelAssmRelease()
{
    var assmReleaseId = document.assmReleaseForm.assmReleaseId.value;
    document.assmReleaseForm.action='<%=chipTracContext%>/assmRelease.do?action=cancel&isCancel=true&assmReleaseId='+assmReleaseId;
    document.assmReleaseForm.submit();
}
function closeAssmRelease()
{
    var assmReleaseId = document.assmReleaseForm.assmReleaseId.value;
    document.assmReleaseForm.action='<%=chipTracContext%>/assmRelease.do?action=close&isClose=true&assmReleaseId='+assmReleaseId;
    document.assmReleaseForm.submit();
}

</SCRIPT>
</HEAD>
<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
    <html:form name="assmReleaseForm" method="post" type="com.scalar.chiptrack.operations.release.forms.AssmReleaseForm" action="/assmRelease.do" enctype="multipart/form-data">
        <%String bgColor = "bgcolor='#FFFFEE'";%>
        <logic:equal name="assmReleaseForm" property="status" value="<%=Constants.RELEASE_STATUS_CANCELLED%>">
            <SCRIPT>document.body.background="<%=chipTracContext%>/jsp/includes/images/cancelled_icon.gif";</SCRIPT>
            <%bgColor = "";%>
        </logic:equal>
        <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='90%' bordercolor='#000000' ALIGN='CENTER'>
            <logic:equal name="isConfirm" value="true">
            <logic:equal name="showMessage" value="TRUE">
                <tr><td colspan="4" align='left'><font class='NArialS'color='blue'><b><%=Constants.NO_APPROVE_RIGHTS %></b></font></td></tr>
            </logic:equal>
            <TR>
                <TD colspan="4" align='left' class="NArialL">
                    <chiptrack:info styleClass="NArialL"/><br><chiptrack:errors styleClass="NArialL"/>
                </TD>
            </TR>
            <tr>
                <td colspan='4'>
                <font class='NArialL'><font color='red'>Are you sure, you want to Approve this Assembly Release &nbsp;&nbsp;</font></font>
                <chiptrack:restrictedLink functionality='<%=Functionality.APPROVE_ASSEMBLY_RELEASE %>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:confirmAssmRelease();' onmouseover="window.status='Confirm this assembly Release';return true" onmouseout="window.status='';return true"><img src='<%=chipTracContext%>/jsp/includes/images/confirm.gif' border='0'></chiptrack:restrictedLink>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <a href="<%=chipTracContext%>/assmRelease.do?action=edit&releaseId=<bean:write name="assmReleaseForm" property="assmReleaseId" />" onMouseOver="window.status='Go Back to Main Assembly Release Menu';return true" onMouseOut="window.status='';return true">
                <img src='<%=chipTracContext%>/jsp/includes/images/back.gif' border='0'></a>
                </td>
            </tr>
            </logic:equal>

            <logic:equal  name="isCancel" value="true">
            <logic:equal name="showMessage" value="TRUE">
                <tr><td colspan="4" align='left'><font class='NArialS'color='blue'><b><%=Constants.NO_APPROVE_RIGHTS %></b></font></td></tr>
            </logic:equal>
            <tr>
                <td colspan='4'>
                <font class='NArialL'><font color='red'>Are you sure, you want to Cancel this Assembly Release &nbsp;&nbsp;</font></font>
                <chiptrack:restrictedLink functionality='<%=Functionality.APPROVE_ASSEMBLY_RELEASE %>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:cancelAssmRelease();' onmouseover="window.status='Cancel this assembly Release';return true" onmouseout="window.status='';return true"><img src='<%=chipTracContext%>/jsp/includes/images/confirm.gif' border='0'></chiptrack:restrictedLink>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <a href="<%=chipTracContext%>/assmReleaseSearch.do" onMouseOver="window.status='Go Back to Main Assembly Release Menu';return true" onMouseOut="window.status='';return true">
                <img src='<%=chipTracContext%>/jsp/includes/images/back.gif' border='0'></a>
                </td>
            </tr>
            </logic:equal>

            <logic:equal  name="isClose" value="true">
            <logic:equal name="showMessage" value="TRUE">
                <tr><td colspan="4" align='left'><font class='NArialS'color='blue'><b><%=Constants.NO_APPROVE_RIGHTS %></b></font></td></tr>
            </logic:equal>
            <tr>
                <td colspan='4'>
                <font class='NArialL'><font color='red'>Are you sure, you want to Close this Assembly Release &nbsp;&nbsp;</font></font>
                <chiptrack:restrictedLink functionality='<%=Functionality.APPROVE_ASSEMBLY_RELEASE %>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:closeAssmRelease();' onmouseover="window.status='Close this assembly Release';return true" onmouseout="window.status='';return true"><img src='<%=chipTracContext%>/jsp/includes/images/confirm.gif' border='0'></chiptrack:restrictedLink>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <a href="<%=chipTracContext%>/assmReleaseSearch.do" onMouseOver="window.status='Go Back to Main Assembly Release Menu';return true" onMouseOut="window.status='';return true">
                <img src='<%=chipTracContext%>/jsp/includes/images/back.gif' border='0'></a>
                </td>
            </tr>
            </logic:equal>

            <TR <%=bgColor%>>
                <TD WIDTH='10%'>
                    <img height='70' src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg">
                </TD>
                <TD width="80%" valign="center">&nbsp;</td>
                <TD width="5%" valign="center" >
                    <a href="javascript:window.print();" title='Click to Print Assembly Release Instructions'><img height="80" width="60" src="<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif" border="0"></a>
                </TD>
                <TD width="5%" valign="center">
                    <%--<a href="javascript:sendMail('<bean:write name="assmReleaseForm" property="assmReleaseId"/>');" title='Click to Mail Assembly Release Instructions'><img src="<%=chipTracContext%>/jsp/includes/images/email1.gif" border="0"></a>--%>
                    <a href="javascript:sendMail('<nested:write name="assmReleaseForm" property="assmReleaseId"/>','<nested:write name="assmReleaseForm" property="requestType"/>','<nested:write name="assmReleaseForm" property="vendorName"/>');" title='Click to Mail Assm Release Instructions'><img src="<%=chipTracContext%>/jsp/includes/images/email1.gif" border="0"></a>
                </TD>
            </TR>
        </TABLE>
        <input type='hidden' name='assmReleaseId' value='<bean:write name="assmReleaseForm" property="assmReleaseId"/>'/>

        <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='90%' bordercolor='#000000' ALIGN='CENTER'>
            <TR>
                <TD WIDTH='100%' bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' bordercolor='black'>
                        <TR>
                            <TD  bordercolor='#000000' WIDTH='100%' ALIGN='center' CLASS='subsectiontitlegray' bgcolor='#DEE1E2'><B>&nbsp;<bean:write  name="assmReleaseForm" property="vendorName"/></B></TD>
                        </TR>
                        <TR>
                            <TD COLSPAN='2' WIDTH='100%' ALIGN='center' CLASS='subsectiontitlegray' style='border-left-width: 2; border-right-width: 2; border-top-style: solid; border-top-width: 2' bgcolor='#DEE1E2'>
                                <B><bean:write  name="assmReleaseForm" property="turnKeyLabel"/> Request</B>
                            </TD>
                        </TR>
                    </TABLE>      
                </TD>
            </TR>
            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%' bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='black'>
                        <TR>
                            <TD COLSPAN='2' WIDTH='100%' ALIGN='left' CLASS='NArialL'  BGCOLOR='#DEE1E2'>
                                <b>Customer</b>
                            </TD>                           
                        </TR>
                        <TR>
                            <TD WIDTH='70%' <%=bgColor%>>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' bordercolor='blue'>
                                    <TR>
                                        <TD WIDTH='25%' CLASS='NArialRS'>Customer name:</TD>
                                        <TD WIDTH='25%' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="customerName"/></TD>
                                        <TD WIDTH='50%' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                    <TR>
                                        <TD ALIGN='left' CLASS='NArialRS'><BR><bean:message key="label.operation.release.internalContactPersons"/>:</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'><BR>&nbsp;Name:</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'><BR>&nbsp;Email:</TD>
                                    </TR>
                                    <logic:present name="contactPersons">
                                        <logic:iterate name="contactPersons" id="contactPerson" type="com.scalar.chiptrack.operations.release.ContactPerson">
                                            <TR>
                                                <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                                <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write name="contactPerson" property="name"/></TD>
                                                <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write name="contactPerson" property="email"/></TD>
                                            </TR>
                                        </logic:iterate>
                                    </logic:present>
                                </TABLE>
                            </TD>
                            <TD WIDTH='30%' VALIGN='TOP'>
                                <TABLE BORDER='1' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' <%=bgColor%>>
                                    <TR>
                                        <TD WIDTH='50%' CLASS='NArialRS' bordercolor='#000000' >
                                            <bean:message key="label.operation.release.assm.ReleaseDate"/>
                                        </TD>
                                        <TD WIDTH='50%' CLASS='NArialRS' bordercolor='#000000' >
                                            &nbsp;
                                            <bean:write  name="assmReleaseForm" property="assmReleaseDate"/>
                                        </TD>
                                    </TR>
                                    <TR>
                                        <TD WIDTH='50%' CLASS='NArialRS' bordercolor='#000000' >
                                            <bean:message key="label.operation.release.assm.documentedBy"/> </TD>
                                        <TD WIDTH='50%' CLASS='NArialRS' bordercolor='#000000' >
                                            &nbsp;
                                            <bean:write  name="assmReleaseForm" property="documentedBy"/>
                                        </TD>
                                    </TR>
                                    <TR>
                                        <TD WIDTH='50%' CLASS='NArialRS' bordercolor='#000000' >
                                            <%--Assembly P O #--%>
                                            <bean:message key="label.operation.release.assm.PONo"/>
                                        </TD>
                                        <TD WIDTH='50%' CLASS='NArialRS' bordercolor='#000000' >
                                            &nbsp;
                                            <bean:write  name="assmReleaseForm" property="poNumber"/>
                                        </TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD COLSPAN='2' BGCOLOR='#DEE1E2' CLASS='NArialL'>
                                Identification        
                            </TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%'>&nbsp;</TD>
                            <TD WIDTH='83%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' >
                                    <TR>
                                        <TD WIDTH='22%' CLASS='NArialRS'><bean:message key="label.operation.release.assm.ReleaseNo"/>:</TD>
                                        <TD WIDTH='20%' CLASS='NArialRS'>
                                            <bean:write name="assmReleaseForm" property="assmReleaseNo"/>
                                        </TD>
                                        <TD WIDTH='20%' ALIGN='left' CLASS='NArialRS'>Revision No:</TD>
                                        <TD WIDTH='38%' ALIGN='left' CLASS='NArialRS'>
                                            <bean:write name="assmReleaseForm" property="assmRevisionNumber"/>
                                        </TD>
                                    </TR>
                                     <TR>
                                        <TD CLASS='NArialRS'>Request Type:</TD>
                                        <TD CLASS='NArialRS'><bean:write name="assmReleaseForm" property="requestType"/></TD>
                                        <TD CLASS='NArialRS'>&nbsp;</TD>
                                        <TD CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD COLSPAN='2' BGCOLOR='#DEE1E2' CLASS='NArialL'>
                                Assembly Info   
                            </TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%'>&nbsp;</TD>
                            <TD WIDTH='83%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' >
                                    <%boolean even = true; %>
                                    <bean:size id="fieldDisplayListSize" name="fieldDisplayList"/>
                                    <logic:greaterThan value="0" name="fieldDisplayListSize">
                                    <logic:iterate name="fieldDisplayList" id="fileldDisplay" indexId="idIndex" type="com.scalar.chiptrack.commons.FieldProperty" >
                                    <%       if( even ) {         %>
                                    <TR>
                                        <% }
                                        even = !even;
                                        %>

                                        <td class="NArialRS">
                                        <bean:write name="fileldDisplay" property="fieldLabel"/> :
                                        </td>
                                        <td class="NArialRS">
                                        <bean:write name="fileldDisplay" property="fieldValue"/>
                                        </td>
                                        <%
                                        if( even )
                                        {
                                        %>

                                        </TR>
                                        <%}%>
                                    </logic:iterate>
                                       <%
                                         if( !even ) {
                                         %>
                                            <TD class="NArialRS">&nbsp;</TD>
                                            <TD class="NArialRS">&nbsp;</TD>

                                         </TR>
                                         <%
                                         }
                                         %>

                                    </logic:greaterThan>
                                    <TR>
                                        <TD CLASS='NArialRS'><bean:message key="label.operation.release.assm.diagramOne"/>:</TD>
                                        <TD COLSPAN='2' CLASS='NArialRS'>
                                            <bean:write name="assmReleaseForm" property="physicalFileName"/>
                                        </TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD COLSPAN='2' BGCOLOR='#DEE1E2' CLASS='NArialL'>
                                <bean:message key="label.operation.release.subConContactInfoHeading"/>
                            </TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%'>&nbsp;</TD>
                            <TD WIDTH='83%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' >
                                    <TR>
                                        <TD COLSPAN='2' WIDTH='42%' CLASS='NArialRS'><b>Name:</b></TD>
                                        <TD COLSPAN='2' WIDTH='58%' CLASS='NArialRS'><b>Email:</b></TD>
                                    </TR>
                                    <logic:present name="vendorContactPersonList">
                                    <logic:iterate name="vendorContactPersonList" id="vendorContactPerson" type="com.scalar.chiptrack.operations.release.ContactPerson">
                                    <TR>
                                        <TD COLSPAN='2' CLASS='NArialRS'><bean:write name="vendorContactPerson" property="name"/></TD>
                                        <TD COLSPAN='2' CLASS='NArialRS'><bean:write name="vendorContactPerson" property="email"/></TD>
                                    </TR>
                                    </logic:iterate>
                                    </logic:present>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>

            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD colspan='4' WIDTH='100%' BGCOLOR='#DEE1E2' CLASS='NArialL'><B>Assm Special Instructions</B></TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%'>&nbsp;</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="4">
                                <bean:write  name="assmReleaseForm" property="comments" filter="false"/>&nbsp;
                            </TD>
                        </TR>
                        <TR>
                            <TD COLSPAN="4" ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
			<TR><TD>&nbsp;</TD></TR>
			<%
				if ( ConfigManager.isReleaseShowMarkingLines() )
                {
			%>
			
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD colspan='4' WIDTH='100%' BGCOLOR='#DEE1E2' CLASS='NArialL'><B>Assembly Release Marking Specifications</B></TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%' CLASS='NArialRS' nowrap>First Line:</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="1">
                                <bean:write  name="assmReleaseForm" property="markingFirstLine" filter="false"/>&nbsp;
                            </TD>
                            <TD>&nbsp;</td>
                            <TD align="center"><img height='40' src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg"></TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%' CLASS='NArialRS' nowrap>Second Line:</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="1">
                                <bean:write  name="assmReleaseForm" property="markingSecondLine" filter="false"/>&nbsp;
                            </TD>
                            <TD colspan="2">&nbsp;</td>
                        </TR>

                        <TR>
                            <TD WIDTH='17%' CLASS='NArialRS' nowrap>Third Line:</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="1">
                                <bean:write  name="assmReleaseForm" property="markingThirdLine" filter="false"/>&nbsp;
                            </TD>
                            <TD colspan="2">&nbsp;</td>
                        </TR>

                        <TR>
                            <TD WIDTH='17%' CLASS='NArialRS' nowrap>Fourth Line:</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="1">
                                <bean:write  name="assmReleaseForm" property="markingFourthLine" filter="false"/>&nbsp;
                            </TD>
                            <TD colspan="2">&nbsp;</td>
                        </TR>

                        <TR>
                            <TD WIDTH='17%' CLASS='NArialRS' nowrap>Fifth Line:</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="1">
                                <bean:write  name="assmReleaseForm" property="markingFifthLine" filter="false"/>&nbsp;
                            </TD>
                            <TD colspan="2">&nbsp;</td>
                        </TR>

                        <TR>
                            <TD WIDTH='17%' CLASS='NArialRS' nowrap>Sixth Line:</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="1">
                                <bean:write  name="assmReleaseForm" property="markingSixthLine" filter="false"/>&nbsp;
                            </TD>
                            <TD colspan="2">&nbsp;</td>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
			 <TR><TD>&nbsp;</TD></TR>
			<%
				}					
			%>
           
            <TR>
                <TD WIDTH='100%' bordercolor='#000000' style='border-style: solid; border-left-width: 2; border-right-width: 2; border-top-width: 2; border-bottom-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD COLSPAN='2' WIDTH='100%' BGCOLOR='#DEE1E2' CLASS='NArialL'>
                                <B>Wafer Information</B>
                            </TD>
                        </TR>
                        <TR>
                            <TD COLSPAN='2' WIDTH='100%' BGCOLOR='#DEE1E2' CLASS='NArialL' style='border-style: solid; border-width: 2'><B>&nbsp;&nbsp;Lot Information</B></TD>
                                <%--<TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' bordercolor='#000000' <%=bgColor%> >
                                    <TR>
                                        <TD WIDTH='25%' CLASS='NArialL' style='border-style: solid; border-width: 2'><B>&nbsp;&nbsp;Lot Information</B></TD>
                                        <TD WIDTH='25%' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD WIDTH='25%' ALIGN='center' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD WIDTH='25%' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                </table>
                            </td>--%>
                        </tr>
                        <TR>
                            <TD COLSPAN='3' bordercolor='#000000'>
                                <TABLE BORDER='1' BORDERCOLOR='#000000' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' <%=bgColor%>>
                                    <TR>
                                        <TD WIDTH='15%' ALIGN='center' CLASS='NArialL'><bean:message key="label.operation.release.assm.partNumber"/></TD>
                                        <TD WIDTH='15%' ALIGN='center' CLASS='NArialL'>Fab Lot#</TD>
                                       <logic:equal value="TRUE" name="showDieBankLotNo">
                                        <TD WIDTH='15%' ALIGN='center' CLASS='NArialL'>Die Bank Lot#</TD>
                                        </logic:equal>
                                        <TD WIDTH='15%' ALIGN='center' CLASS='NArialL'><bean:message key="label.operation.release.assm.shippedLotNo"/></TD>
                                        <TD WIDTH='15%' ALIGN='center' CLASS='NArialL'>Wafer #</TD>
										<TD WIDTH='12%' ALIGN='center' CLASS='NArialL'>Good Die</TD>
                                        <TD WIDTH='12%' ALIGN='center' CLASS='NArialL'>Qty Pulled</TD>
                                        <TD WIDTH='12%' ALIGN='center' CLASS='NArialL'>Qty To Build</TD>
                                        <TD WIDTH='10%' ALIGN='center' CLASS='NArialL'>Die Bank<br>Location</TD>
										<%--<TD WIDTH='15%' ALIGN='center' CLASS='NArialL'>Wafer Map or Inked </TD>--%>
                                        <logic:equal value="TRUE" name="showScreenPrintOrder">
                                        <td align="center" class="NArialL">Screen Print Order</td>
                                        </logic:equal>
                                        <logic:equal value="TRUE" name="showBackGrindOrder">
                                        <td align="center" class="NArialL">Back Grind Order</td>
                                        </logic:equal>
                                    </TR>
                                    <%
                                       AssmReleaseForm form = (AssmReleaseForm)session.getAttribute("assmReleaseForm");
                                       int diesperPkg = form.getDiesPerPackage();
                                       int totalBuildQty = 0;
                                    %>
                                    <nested:iterate name="assmReleaseForm" property="releaseLotList" id="lot" type="com.scalar.chiptrack.operations.release.ReleaseLot">
										<nested:equal property="selected" value="true">
                                        <%
                                            String buildQty = Math.floor(lot.getQtyPulled()/diesperPkg) +"";
                                            totalBuildQty   += Integer.parseInt(buildQty.substring(0, buildQty.indexOf(".") ));
                                        %>
                                        <TR>
                                            <TD ALIGN='center' CLASS='NArialRS' style='border-left-style: none; border-left-width: 0;'>
                                                &nbsp;<bean:write  name="assmReleaseForm" property="dieBankProductName"/>
                                            </TD>
                                            <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="fabLotNumber"/></TD>
                                            <logic:equal value="TRUE" name="showDieBankLotNo">
                                            <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="lotNumber"/></TD>
                                            </logic:equal>
                                            <TD ALIGN='center' CLASS='NArialRS'><nested:write property="shippedLotNumber"/></TD>
											<TD ALIGN='center' CLASS='NArialRS'><nested:write property="waferId"/></TD>
                                            <TD ALIGN='center' CLASS='NArialRS'><nested:write property="qtyAvailable"/></TD>
                                            <TD ALIGN='center' CLASS='NArialRS'><nested:write property="qtyPulled"/></TD>
                                            <TD ALIGN='center' CLASS='NArialRS'><%out.println(buildQty.substring(0, buildQty.indexOf(".") ) );%></TD>
											<TD ALIGN='center' CLASS='NArialRS'><bean:write name="assmReleaseForm" property="fromVendorName"/></TD>
											<%--<TD ALIGN='center' CLASS='NArialRS'>&nbsp;<bean:write name="assmReleaseForm" property="waferMapOrInked"/></TD>--%>
                                            <logic:equal value="TRUE" name="showScreenPrintOrder">
                                            <td align="center" CLASS='NArialRS'>&nbsp;
                                                <bean:write name="assmReleaseForm" property="screenPrintOrder"/>
                                            </td>
                                            </logic:equal>
                                            <logic:equal value="TRUE" name="showBackGrindOrder">
                                            <td align="center" CLASS='NArialRS'>&nbsp;
                                                <bean:write name="assmReleaseForm" property="backGrindOrder"/>
                                            </td>
                                            </logic:equal>
                                        </TR>
										</nested:equal>
                                    </nested:iterate>
                                    <TR >
                                        <TD style='border-bottom-style: none; border-bottom-width: 0; border-right-style: none; border-right-width: 0; border-left-style: none; border-left-width: 0;'>&nbsp;</TD>
                                        <TD style='border-bottom-style: none; border-bottom-width: 0; border-right-style: none; border-right-width: 0; border-left-style: none; border-left-width: 0;'>&nbsp;</TD>
                                        <logic:equal value="TRUE" name="showDieBankLotNo">
                                        <TD style='border-bottom-style: none; border-bottom-width: 0; border-right-style: none; border-right-width: 0; border-left-style: none; border-left-width: 0;'>&nbsp;</TD>
                                        </logic:equal>
                                        <TD style='border-bottom-style: none; border-bottom-width: 0; border-right-style: none; border-right-width: 0; border-left-style: none; border-left-width: 0;'>&nbsp;</TD>
                                        <TD style='border-bottom-style: none; border-bottom-width: 0; border-right-style: none; border-right-width: 0; border-left-style: none; border-left-width: 0;'>&nbsp;</TD>
                                        <TD ALIGN='right' CLASS='NArialR' style='border-bottom-style: none; border-bottom-width: 0; border-left-style: none; border-left-width: 0;'>
                                            Total Qty
                                            &nbsp;&nbsp;
                                        </TD>
                                        <TD ALIGN='center' CLASS='NArialRS' style='border-bottom-style: none; border-bottom-width: 0;'>
                                            &nbsp;
                                            <nested:write property="totalDieQtyPulled"/></TD>
                                        <TD ALIGN='center' CLASS='NArialRS' style='border-bottom-style: none; border-bottom-width: 0;'>
                                            &nbsp;
                                            <%out.println(totalBuildQty);%></TD>
                                        <TD colspan="4" style='border-bottom-style: none; border-bottom-width: 0;'>&nbsp;</TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                        <logic:equal name="assmReleaseForm" property="bomLotAvailable" value="true">
                        <TR><TD COLSPAN='3'>&nbsp;</TD></TR>
                        <TR>
                            <TD COLSPAN='2' WIDTH='100%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                                    <TR>
                                        <TD WIDTH='25%' CLASS='NArialL'><B>&nbsp;&nbsp;<bean:message key="label.operation.release.assm.BOMLot" /> Lot Information</B></TD>
                                        <TD WIDTH='25%' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD WIDTH='25%' ALIGN='center' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD WIDTH='25%' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                </table>
                            </td>
                        </tr>
                        <TR>
                            <TD COLSPAN='3' bordercolor='#000000'>
                                <TABLE BORDER='1' BORDERCOLOR='#000000' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' <%=bgColor%>>
                                    <TR>
                                        <TD WIDTH='14%' ALIGN='center' CLASS='NArialL'><bean:message key="label.operation.release.assm.BOMLot" /> Part Number</TD>
                                        <TD WIDTH='14%' ALIGN='center' CLASS='NArialL'>Lot #</TD>
                                        <%
                                            if ( ConfigManager.isBomPullingByWaferId() )
                                            {
                                        %>
                                                <TD WIDTH='15%' ALIGN='center' CLASS='NArialL'>Wafer #</TD>
                                        <%  } %>
                                        <TD WIDTH='14%' ALIGN='center' CLASS='NArialL'>Total Die</TD>
                                        <TD WIDTH='14%' ALIGN='center' CLASS='NArialL'>Use Die</TD>
                                        <TD WIDTH='14%' ALIGN='center' CLASS='NArialL'>From Location</TD>
                                    </TR>
                                    <nested:iterate name="assmReleaseForm" property="bomLotInventoryList" id="lot" type="com.scalar.chiptrack.operations.release.ReleaseLot">
                                        <nested:equal property="selected" value="true">
                                        <TR>
                                            <TD ALIGN='center' CLASS='NArialRS' style='border-left-style: none; border-left-width: 0;'>&nbsp;<nested:write property="bomPartNumber"/></TD>
                                            <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="lotNumber"/></TD>
                                            <%
                                                if ( ConfigManager.isBomPullingByWaferId() )
                                                {
                                            %>
                                                    <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="waferId"/></TD>
                                            <%  }  %>
                                            <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="qtyAvailable"/></TD>
                                            <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="qtyPulled"/></TD>
                                            <TD ALIGN='center' CLASS='NArialRS'>&nbsp;<nested:write property="currentVendor"/></TD>
                                        </TR>
                                        </nested:equal>
                                    </nested:iterate>
                                </TABLE>
                            </TD>
                        </TR>
                        </logic:equal>
                    </TABLE>
                </TD>
            </TR>
            <TR><TD>&nbsp;</TD></TR>
            <bean:define id="testLocationId" name="assmReleaseForm" property="testLocation_id" type="java.lang.Integer"/>
            <%--<logic:equal name="assmReleaseForm" property="turnKey" value="true">--%>
            <logic:equal name="assmReleaseForm" property="toLocation_id" value="<%=testLocationId.toString()%>" >
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD COLSPAN='2' BGCOLOR='#DEE1E2' CLASS='NArialL'>
                                Testing Information
                            </TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%'>&nbsp;</TD>
                            <TD WIDTH='83%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' >
                                    <TR>
                                        <TD WIDTH='22%' CLASS='NArialRS'>Test Location:</TD>
                                        <TD WIDTH='20%' CLASS='NArialRS'>
                                            <bean:write name="assmReleaseForm" property="testLocation"/>
                                        </TD>
                                        <TD WIDTH='20%' ALIGN='left' CLASS='NArialRS'>Test PO No:</TD>
                                        <TD WIDTH='38%' ALIGN='left' CLASS='NArialRS'>
                                            <bean:write name="assmReleaseForm" property="testPONumber"/>
                                        </TD>
                                    </TR>
                                     <TR>
                                        <TD CLASS='NArialRS'>Test Spec:</TD>
                                        <TD CLASS='NArialRS'><bean:write name="assmReleaseForm" property="testSpecFileName"/></TD>
                                        <TD CLASS='NArialRS'>Test Spec Rev</TD>
                                        <TD CLASS='NArialRS'><bean:write  name="assmReleaseForm" property="testRevisionNumber"/>&nbsp;</TD>
                                    </TR>
                                    <%--<TR>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>Test Program Name</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="testProgramName"/></TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>Test Program Rev No</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="testProgramRevNo"/></TD>
                                    </TR>
                                    <TR>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>Room Temp Test</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="roomTestTemp"/></TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>Hot Temp Test</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="hotTempTest"/></TD>
                                    </TR>
                                    <TR>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>QA Test</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="qaTest"/></TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                    <TR>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>--%>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>

            <TR><TD>&nbsp;</TD></TR>
                
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD colspan='4' WIDTH='100%' BGCOLOR='#DEE1E2' CLASS='NArialL'><B>Test Special Instructions</B></TD>
                        </TR>
                        <TR>
                            <TD WIDTH='17%'>&nbsp;</TD>
                            <TD ALIGN='left' CLASS='NArialRS' COLSPAN="4">
                                <bean:write  name="assmReleaseForm" property="testInstructions" filter="false"/>&nbsp;
                            </TD>
                        </TR>
                        <TR>
                            <TD COLSPAN="4" ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            </logic:equal>
            <%--</logic:equal>--%>            
            <logic:greaterThan name="assmReleaseForm" property="tapeReelQty" value="0">
            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%' bordercolor='#000000'  style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' bordercolor='#000000' <%=bgColor%>>
                        <TR>
                            <TD WIDTH='80%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' bordercolor='black'>
                                    <TR>
                                        <TD colspan='5' WIDTH='100%' BGCOLOR='#DEE1E2' CLASS='NArialL'><B>Reel Infomartion</B></TD>
                                    </TR>
                                    <TR>
                                        <TD width='17%' ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD width='20%' ALIGN='left' CLASS='NArialRS'>Reel Qty:</TD>
                                        <TD width='20%' ALIGN='left' CLASS='NArialRS'>&nbsp;<bean:write  name="assmReleaseForm" property="tapeReelQty"/></TD>
                                        <TD width='20%' ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD width='23%' ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                    <TR>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                        <TD ALIGN='left' CLASS='NArialRS'>&nbsp;</TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>

            </logic:greaterThan>

            <TR><TD>&nbsp;</TD></TR>
            <TR>
                <TD WIDTH='100%'  bordercolor='#000000' style='border-style: solid; border-width: 2'>
                    <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' <%=bgColor%>>
                        <TR>
                            <TD WIDTH='100%'>
                                <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='4' WIDTH='100%' <%=bgColor%>>
                                    <TR>
                                        <%--<TD colspan='4' WIDTH='100%'BGCOLOR='#DEE1E2' CLASS='NArialL'><B>Upon Completion, Please Ship to <bean:write name="assmReleaseForm" property="shipToProcess"/> Process Vendor <bean:write name="assmReleaseForm" property="shipToVendorName"/></B></TD>--%>
                                        <TD colspan='4' WIDTH='100%'BGCOLOR='#DEE1E2' CLASS='NArialL'><B>Upon Completion, Please Ship to Vendor <bean:write name="assmReleaseForm" property="shipToVendorName"/></B></TD>
                                    </TR>
                                    <TR>
                                        <TD WIDTH='17%' VALIGN='top' CLASS='NArialL'>Address&nbsp;</TD>
                                        <TD WIDTH='53%' CLASS='NArialRS'>&nbsp;
                                            <bean:write  name="assmReleaseForm" property="formattedShippingAddress" filter="false"/>
                                        </TD>
                                        <TD WIDTH='10%' ALIGN='left' VALIGN='top' CLASS='NArialRS' nowrap>Send Ship Alerts to:</TD>
                                        <TD WIDTH='20%' ALIGN='left' VALIGN='top' CLASS='NArialRS'><bean:write  name="assmReleaseForm" property="formattedShipalerts" filter="false"/></TD>
                                    </TR>
                                    <TR>
                                        <TD ALIGN='left' COLSPAN='4' CLASS='NArialL'><%--Freight Forwarder : &nbsp;<bean:write  name="assmReleaseForm" property="freightCarrier"/>--%></TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            <TR><TD>&nbsp;</TD></TR>
        </TABLE>
    </html:form>
</BODY>
</HTML>

